FROM qingpan/rnacos:v0.6.12

LABEL authors="kennylee"

# 更新证书
RUN apt-get update && apt-get install -y ca-certificates && update-ca-certificates

# 使用阿里云镜像
RUN sed -i 's|http://deb.debian.org/debian|https://mirrors.aliyun.com/debian|g' /etc/apt/sources.list.d/debian.sources && \
    sed -i 's|http://security.debian.org/debian-security|https://mirrors.aliyun.com/debian-security|g' /etc/apt/sources.list.d/debian.sources

# 更新系统并安装常用软件
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        curl git unzip vim wget locales && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# 设置系统语言为中文（启用 zh_CN.UTF-8）
RUN sed -i 's/# zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/' /etc/locale.gen && \
    locale-gen && \
    update-locale LANG=zh_CN.UTF-8

# 设置时区和终端环境
ENV LANG=zh_CN.UTF-8 \
    LANGUAGE=zh_CN:zh:en_US:en \
    LC_ALL=zh_CN.UTF-8 \
    TZ=Asia/Shanghai \
    DEBIAN_FRONTEND=noninteractive \
    TERM=xterm

RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
    echo $TZ > /etc/timezone && \
    dpkg-reconfigure --frontend noninteractive tzdata